Using HBAnyware Command-Line Interface

The Command Line Interface (CLI) Client component of HBAnyware provides access to the capabilities of the Remote Management library from a console command prompt. This component is intended for use in scripted operations from within shell scripts, batch files, or the specific platform equivalent.

Note HBAnyware must be running on all remote hosts to be discovered and managed.

For in-band management, remote capabilities of HBAnyware are subject to fabric zoning configuration. Remote hosts to be discovered and managed by HBAnyware must be in the same zone.
 

Using the CLI Client

The CLI Client is a console application named HBACMD.EXE (Windows) or hbacmd (UNIX). Each time you run this application from the command line, a single operation is performed.

The first parameter of this command is the requested operation. When the specified operation is completed, the command prompt is displayed. Most operations retrieve information about an entity on the SAN and display that information on the console.

Most of the CLI Client commands require one or more additional parameters that specify the nature of the command. A parameter used by many HBACMD commands specifies the World Wide Port Name of the host bus adapter (HBA) that is the target of the command. For example, the following command displays the port attributes for the HBA with the specified World Wide Port Name:

For Windows Systems

c:\>hbacmd portattrib 10:00:00:00:c9:20:20:20

HBACMD can be run in out-of-band mode by making the first argument                                   h=<host>. For example:

c:\>hbacmd h=cp-hp5670 listhbas
c:\>hbacmd h=138.239.91.121 listhbas

For Unix Systems

/usr/sbin/hbanyware/hbacmd portattrib 10:00:00:00:c9:20:20:20

hbacmd can be run in out-of-band mode by making the first argument                                   h=<host>. For example:

/usr/sbin/hbanyware/hbacmd h=cp-hp5670 listhbas                            
/usr/sbin/hbanyware/hbacmd
h=138.239.91.121 listhbas

Syntax Rules

The syntax rules for HBACMD are as follows:

  • All commands and their arguments are case insensitive.  

  • The requested operation must contain at least three characters, or as many as needed to distinguish it from any other operation.

  • Whenever a WWPN is specified, individual fields are separated by colons (:) or spaces ( ).  When using space separators, the entire WWPN must be enclosed in quotes (").  

  • All HBACMD inputs must be in hexadecimal format.  The only exceptions are the cycle-counts used in some of the diagnostic commands.

Out-of-Band Access

Out-of-band (OOB) access enables you to access HBAs via their IP-address or by the name of the host on which they reside.  Since HBAs may exist on a host but not be a part of a Fibre Channel network, they will not appear during normal in-band discovery.  Thus, OOB access enlarges the number of HBAs that can be queried or modified.

Note A local host cannot be accessed out-of-band.

OOB access via HBACMD uses an additional parameter on the command line.  The parameter must be the first parameter in the list, coming immediately after HBACMD.  The remaining parameters are those documented for each operation.  

Note You can also access an in-band HBA via its OOB address.

The format of the OOB parameter is:

h={<IPAddress> | <host-name>}

Some examples are:

h=128.239.91.88
h=cp-compaq8000

Entering the following:

hbacmd h=128.239.91.88 listHBAs

lists all HBAs running on the host having the specified IP address.  If the IP address is not known but the host name is, enter:

hbacmd h=cp-compaq8000 listHBAs

If the host is unreachable, the command will return an error.

CLI Client Command Reference

Note CLI Client commands are not case sensitive.

Version

Syntax: HBACMD Version

Description: Displays the current version of the HBAnyware CLI client application.  To view the current version enter:

hbacmd version

Parameters: None.

ListHBAs

Syntax: HBACMD ListHBAs

Description: Displays a list of the discovered manageable Emulex HBAs and some of their attributes.  The list will contain one 6-attribute group for each discovered adapter.  

Parameters: None.

SaveConfig

Syntax: HBACMD SaveConfig <wwpn> <filename> <ctrlword>

Description: Saves to a file the contents of the driver parameter list for the specified HBA.  The file will be a list of parameter definitions, in ASCII, with each definition delimited by a comma.  Each definition is of the form

<parameter-name>=<parameter-value>

The caller may choose to save either the values of the global set or those specific to the referenced HBA. The file created by this command will be stored in the Emulex Repository directory.

Parameters:

WWPN - The World Wide Port Name of the HBA whose driver parameters are to be saved. This HBA can be either local or remote.

filename - The name of the file that will contain the driver parameter list upon successful completion of this command.

ctrlword - G = save the global parameter set. N = save the local (adapter-specific) parameter set.

HBAAttrib

Syntax: HBACMD HBAAttrib <wwpn>

Description: Displays a list of all HBA attributes for the HBA with the specified WWPN.  To view the HBA attributes for the adapter enter:

hbacmd hbaattrib 10:00:00:00:c9:20:08:cc

Parameters:

WWPN - The World Wide Port Name of the HBA. This HBA can be either local or remote.

PortAttrib

Syntax: HBACMD PortAttrib <wwpn>

Description: Displays a list of all port attributes for the port with the specified WWPN.  To view the port attributes for the adapter enter:

hbacmd portattrib 10:00:00:00:c9:20:08:cc

Parameters:

WWPN - The World Wide Port Name of the Port. This port can be either local or remote.

PortStat

Syntax: HBACMD PortStat <wwpn>

Description: Displays all port statistics for the HBA with the specified WWPN.   To view the port statistics for the adapter shown enter:

hbacmd portstat 10:00:00:00:c9:20:08:cc

Parameters:

WWPN - The World Wide Port Name of the Port. This port can be either local or remote.

ServerAttrib

Syntax: HBACMD ServerAttrib <WWPN>

Description: Displays a list of attributes of the server that is running locally to the specified HBA.  To view the server attributes for the HBA  enter:

hbacmd serverattrib 10:00:00:00:c9:20:08:cc

Parameters:

WWPN - The World Wide Port Name of any HBA local to the designated server. The HBA itself can be either local or remote.

TargetMapping

Syntax: HBACMD TargetMapping <wwpn>

Description: Displays a list of mapped targets and the LUNs attached to each for the port with the specified WWPN.  To view the target mapping for 10:00:00:00:c9:20:08:0c enter:

hbacmd targetmapping 10:00:00:00:c9:20:08:cc

Parameters:

WWPN - The World Wide Port Name of the Port. This port can be either local or remote.

Reset

Syntax: HBACMD Reset <wwpn>

Description: Resets the adapter with the specified WWPN.  Resetting an adapter may require several seconds to complete, especially for remote devices.  This command will return for additional input only after the reset has finished.  To reset an adapter whose WWPN is 10:00:00:00:c9:e:51:2e enter:

hbacmd reset 10:00:00:00:c9:2e:51:2e

Parameters:

WWPN - The World Wide Port Name of the Port. This port can be either local or remote.

Download

Syntax: HBACMD Download <wwpn> <filename>

Description: Loads the specified firmware image to the HBA with the specified WWPN.  To load the firmware image located in hdc190a4.dwc to an HBA with
WWPN 10:00:00:00:c9:2e:51:2e enter:

hbacmd download 10:00:00:00:c9:2e:51:2e hdc190a4.dwc

Parameters:

WWPN - The World Wide Port Name of the HBA that is the target of the firmware download. This HBA can be either local or remote.

FileName - The file name of the firmware image that is to be loaded. This can be any file that is accessible to the CLI client application.

PersistentBinding

Note This command is not supported by the Linux 2.6 kernel or by the Emulex  version 8 driver for Linux.

Syntax: HBACMD PersistentBinding <wwpn> <source>

Description: Queries the presence of any persistent binding that may exist for the specified WWPN.  The <source> is used to query either the configured or live state of any binding that may be present.  To view the configured persistent binding for an adapter whose WWPN is 10:00:00:00:c9:20:0d:36 enter:

hbacmd persistentbinding 10:00:00:00:c9:20:0d:36 C

 

Parameters:

WWPN - The World Wide Port Name of the HBA whose persistent binding state is being queried. This HBA can be either local or remote.

source - C if the configured state is being queried.  L if the live state is being queried.

AllNodeInfo

Syntax: HBACMD AllNodeInfo <wwpn>

Description: Displays target node information for each target that is accessible from the specified HBA. To view the target node data for 10:00:00:00:c9:20:0d:36, enter:

Hbacmd allnodeinfo 10:00:00:00:c9:20:0d:36

Parameters:

WWPN The World Wide Port Name of the HBA whose target node information is being queried. This HBA can be either local or remote.

SetPersistentBinding

Note This command is not supported by the Linux 2.6 kernel or by the Emulex  version 8 driver for Linux.

Syntax: HBACMD SetPersistentBinding <wwpn> <scope> <bindtype> <ID> \
                <scsibus> <scsitarget>

Description: Sets a persistent binding between a Fibre Channel target and a SCSI bus and target.  The binding can be to a target WWPN, target WWNN, or target D_ID.  

To bind permanently, on behalf of HBA 10:00:00:00:c9:2e:51:2e, target WWPN 20:00:00:d0:b2:00:30:40 to Scsi bus 1, target 3, enter:

hbacmd setpersistentbinding 10:00:00:00:c9:2e:51:2e P P \
                        20:00:00:d0:b2:00:30:40 1 3

To bind immediately, on behalf of HBA 10:00:00:00:c9:2e:51:2e, target D_ID 10101 to Scsi bus 1, target 3, enter:

hbacmd setpersistentbinding 10:00:00:00:c9:2e:51:2e I D \
                        10101 1 3

Parameters:

WWPN-

The World Wide Port Name of the HBA for which a persistent binding is to be set. This HBA can be either local or remote.

scope -

P = binding is permanent (survives across reboot)
I  = binding is immediate
B = binding is both permanent and immediate

bindtype -

P = enable binding by WWPN
N = enable binding by WWNN
D = enable binding by D_ID

ID -

Target WWPN if bindtype = P
Target WWNN if bindtype = N
Target D_ID if bindtype = D

scsibus -

The Bus number of SCSI device.

scsitarget -

The target number of SCSI device.

RemoveAllPersistentBinding

Note This command is not supported by the Linux 2.6 kernel or by the Emulex  version 8 driver for Linux.

Syntax: HBACMD RemoveAllPersistentBinding <wwpn>

Description: Removes all persisting bindings associated with the referenced HBA.  To remove all persistent bindings for 10:00:00:00:c9:21:5e:21, enter:

hbacmd removeallpersistentbinding 10:00:00:00:c9:21:5e:21

Parameters:

WWPN - The World Wide Port Name of the HBA for which all persistent bindings are to be removed. This HBA can be either local or remote.

RemovePersistentBinding

Note This command is not supported by the Linux 2.6 kernel or by the Emulex  version 8 driver for Linux.

Syntax: HBACMD RemovePersistentBinding <wwpn> <bindtype> <ID> \
                          <scsibus>  <scsitarget>

Description: Removes a persistent binding between a Fibre Channel target and a SCSI bus and target.  The binding to be removed can be to a target WWPN, target WWNN, or target D_ID.  

To remove, on behalf of HBA 10:00:00:00:c9:2e:51:2e, the binding between target WWPN=20:00:00:d0:b2:00:30:40 and Scsi bus 1, target 3, enter:

hbacmd removepersistentbinding 10:00:00:00:c9:2e:51:2e P \
                               20:00:00:d0:b2:00:30:40 1 3    

To remove, on behalf of HBA 10:00:00:00:c9:2e:51:2e, the binding between target D_ID=10101 and Scsi bus 1, target 3, enter:

hbacmd removepersistentbinding 10:00:00:00:c9:2e:51:2e D \
                                10101 1 3

Parameters:

WWPN -

The World Wide Port Name of the HBA for which a persistent binding is to be removed. This HBA can be either local or remote.

bindtype -

P = enable binding by WWPN
N = enable binding by WWNN
D = enable binding by D_ID

ID -

Target WWPN if bindtype = P
Target WWNN if bindtype = N
Target D_ID if bindtype = D

scsibus -

The Bus number of SCSI device.

scsitarget -

The target number of SCSI device.

BindingCapabilities

Note This command is not supported by the Linux 2.6 kernel or by the Emulex  version 8 driver for Linux.

Syntax: HBACMD BindingCapabilities <wwpn>

Description: Displays the binding capabilities present at the referenced HBA. To view the binding capabilities at 10:00:00:00:c9:21:5e:21, enter:

hbacmd bindingcapabilities 10:00:00:00:c9:21:5e:21

Parameters:

WWPN - The World Wide Port Name of the HBA whose binding capabilities are being queried. This HBA can be either local or remote.

BindingSupport

Note This command is not supported by the Linux 2.6 kernel or by the Emulex  version 8 driver for Linux.

Syntax: HBACMD BindingSupport <wwpn> <source>

Description: Displays the binding support available at the reference HBA.  To view the configured binding support for 10:00:00:00:c9:21:5e:21, enter:

hbacmd bindingsupport 10:00:00:00:c9:21:5e:21 C

Parameters:

WWPN - The World Wide Port Name of the HBA whose binding support is being queried. This HBA can be either local or remote.

source - C if the support is being queried. L if the live support is being queried.

SetBindingSupport

Note This command is not supported by the Linux 2.6 kernel or by the Emulex  version 8 driver for Linux.

Syntax: HBACMD SetBindingSupport <wwpn> <bindflag>

Description: Sets the binding support(s) for the referenced HBA.  To enable binding support for WWPN and Automap on HBA 10:00:00:00:c9:21:5e:21, enter:

hbacmd setbindingsupport 10:00:00:00:c9:21:5e:21 P1

Parameters:

WWPN -

The World Wide Port Name of the HBA for which binding support is being set. This HBA can be either local or remote.

bindflag -

1 = enable support for Automap binding
0 = disable support for Automap binding        
P1 = enable support for WWPN binding and Automap
N1 = enable support for WWNN binding and Automap
D1 = enable support for D_ID binding and Automap
P0 = enable support for P, disable Automap
N0 = enable support for N, disable Automap
D0 = enable support for D, disable Automap

DriverParams

Syntax: HBACMD DriverParams <wwpn>

Description: Displays the name and values of each driver parameter for the selected HBA.  To view the driver parameters for HBA 10:00:00:00:c9:2e:51:2e enter:

hbacmd driverparams 10:00:00:00:c9:2e:51:2e

Parameters:

WWPN - The World Wide Port Name of the HBA whose driver parameters are to be viewed. This HBA can be either local or remote.

DriverParamsGlobal

Syntax: HBACMD DriverParamsGlobal <wwpn>

Description: Displays the name and the global value of each driver parameter for the selected HBA.  To view the global driver parameters for HBA 10:00:00:00:c9:2e:51:2e enter:

hbacmd driverparamsglobal 10:00:00:00:c9:2e:51:2e

Parameters:

WWPN - The World Wide Port Name of the HBA whose driver parameters are to be viewed. This HBA can be either local or remote.

SetDriverParam

Note UNIX users may only set the log_verbose, use_adisc and nodev_tmo parameters using this command.

Syntax: HBACMD SetDriverParam <wwpn> <ctrlword> <param> <value>

Description: Changes the value of the specified driver parameter that is operating the referenced HBA, and to designate the scope of that change.  To change the value of the LinkSpeed parameter (for example) for 10:00:00:00:c9:2e:51:2e and make it permanent, enter:

hbacmd SetDriverParam 10:00:00:00:c9:2e:51:2e p linkspeed 2

Parameters:

WWPN -

The World Wide Port Name of the HBA whose Boot BIOS is to be modified. This HBA can be either local or remote.

ctrlword -

P = make change permanent
G = make change global
B = make change both permanent and global
N = make change neither permanent nor global

param -

The name of the parameter whose value is to be modified.

Value -

The new value to be assigned to the parameter.

SetBootBios

Syntax: HBACMD SetBootBios <wwpn> <ctrlword>

Description: Enables or disables the Boot BIOS on the referenced HBA.  To enable the Boot BIOS for 10:00:00:00:c9:2e:51:2e, enter:

hbacmd setbootbios 10:00:00:00:c9:2e:51:2e E

Parameters:

WWPN -

The World Wide Port Name of the HBA whose Boot BIOS is to be modified. This HBA can be either local or remote.

ctrlword -

E = enable the Boot BIOS
D = disable the Boot BIOS

PciData

Syntax: HBACMD PciData <wwpn>

Description: Returns PCI configuration data for the HBA specified by the WWPN.

For example, type:

hbacmd pcidata 10:00:00:00:c9:2e:51:2e

Parameters:

WWPN - The World Wide Port Name of the HBA whose PCI configuration data is desired.

 Wakeup

Syntax: HBACMD wakeup <wwpn>

Description: Returns wakeup parameter data for the HBA specified by the WWPN.

For example, type:

hbacmd wakeup 10:00:00:00:c9:2e:51:2e

Parameters:

WWPN - The World Wide Port Name of the HBA whose wakeup parameter data is desired.

LoopMap

Syntax: HBACMD loopmap <wwpn>

Description: Returns the arbitrated loop map data for the HBA specified by the WWPN.

For example, type:

hbacmd loopmap 10:00:00:00:c9:2e:51:2e

Parameters:

WWPN - The World Wide Port Name of the HBA whose loopmap is desired.

GetBeacon

Syntax: HBACMD getbeacon <wwpn>

Description: Returns the current beacon status for the HBA specified by the WWPN.

For example, type:

hbacmd getbeacon 10:00:00:00:c9:2e:51:2e

Possible responses are:

Beacon State = On

Beacons State = Off

Unable to get Beacon state, error 1

Parameters:

WWPN - The World Wide Port Name of the HBA whose beacon status is desired.

SetBeacon

Syntax: HBACMD setbeacon <wwpn> <state>

Description: Sets the current beacon status for the HBA specified by the WWPN. Example: beacon OFF:

hbacmd setbeacon 10:00:00:00:c9:2e:51:2e 0   

Example: beacon ON:

hbacmd setbeacon 10:00:00:00:c9:2e:51:2e 1   

Possible responses are:

Beacon State = On

Beacons State = Off

Unable to get Beacon state, error 1

Parameters:

WWPN-

The World Wide Port Name of the HBA whose beacon status is to be set.

State -

The new state of the beacon:
0 = beacon OFF
1= beacon ON

PostTest

Syntax: HBACMD posttest <wwpn>

Description: Runs the POST test on the HBA specified by the WWPN. Support for remote adapters is out-of-band (Ethernet) only.

For example, type:

hbacmd h=138.239.83.87 posttest 10:00:00:00:c9:2e:51:2e    

Below  is a sample response:

Running POST, polling for results.....
Power On Self Test Succeeded;  time to execute = 8928 ms

Parameters:

WWPN - The World Wide Port Name of the HBA to run POST test on.

EchoTest

Syntax: HBACMD echotest <wwpn1> <wwpn2> <count> <StopOnError>

Description: Runs the echo test on the HBAs specified by the WWPN1 and WWPN2.
 

Note Support for remote adapters is out-of-band (Ethernet) only.

The EchoTest command will fail if the target WWPN does             not support the ECHO ELS command.

For example, type:

hbacmd h=138.239.83.87 echotest 10:00:00:00:c9:2e:51:2e
10:00:00:00:c9:2e:51:45 10 1   

Below is a sample response:

Echo test: polling for results......
Echo test succeeded; time to execute = 53 ms.

Parameters:

WWPN1-

The World Wide Port Name of the originating HBA.

WWPN2-

The World Wide Port Name of the destination (echoing) HBA.

Count-

The number of times to run the test.

StopOnError-

Should the test be halted on Error?
0 = no halt
1 = halt

Loopback

Syntax: HBACMD loopback <wwpn> <type> <count> <StopOnError>

Description: Runs the loop test on the HBA specified by the WWPN.

Note Only external Loopback tests must be run out-of-band.
 

For example, type:

hbacmd h=138.239.83.87 loopback 10:00:00:00:c9:2e:51:2e 1 10 0   

Here is a sample response:

Running Loopback:  polling for results......
Loopback Test Failed; xmit errors = 3; rcv errors = 2; time to execute = 1015 ms.

Parameters:

WWPN-

The World Wide Port Name of the HBA on which to run the loopback test(s).

Type-

Type of loopback test where:
0 =  PCI LoopBack Test
1 =  Internal LoopBack Test
2 =  External LoopBack Test

Count-

The number of times to run the test (Range = 1,...10000).

StopOnError-

Should the test be halted on Error?
0  = no halt                                                                                              
1 = halt

Dump

Syntax: HBACMD dump <wwpn>

Description: Runs the dump diagnostic retrieval command on the HBA specified by the WWPN. This command is supported for local HBAs only.

For example, type:

hbacmd dump 10:00:00:00:c9:2e:51:2e    

Parameters:

WWPN- The World Wide Port Name of the HBA on which to run the dump.

DriverConfig

Syntax: HBACMD driverconfig <wwpn> elxstor-5-1.20A0.dpv

Description: Sets all driver parameters for the HBA specified by WWPN to the driver parameter values contained in the driver parameter file (elxstor-5-1.20A0.dpv in the above example). These files can be easily generated via the HBAnyware Driver Parameter tab. Driver types must match between .dpv file type and host platform HBA.

For example, type:

hbacmd driverconfig 10:00:00:00:c9:2e:51:2e elxstor-5-1.20A0.dpv

Below is a sample response:

hbacmd: Success setting driver configuration parameters to values in .dpv file.

Parameters:

WWPN - The World Wide Port Name of the HBA on which to set driver parameters.

DeleteDumpFiles

Syntax: HBACMD deletedumpfiles <wwpn>

Description: Deletes all dump files associated with the HBA specified by the WWPN.

For example:

hbacmd deletedumpfiles 10:00:00:00:c9:2e:51:2e

HBACMD: Dump file deletion complete.  

Parameters:

WWPN - The World Wide Port Name of the HBA whose dump files are to be deleted.

  Back to top


copyright © - Emulex Corporation - all rights reserved - 2006